import createAuthority from './kuan-utils/localData/createAuthority'

const authority = createAuthority('PRO_USER_INFO')

// 获取登陆token
export function getToken() {
  return authority.getToken()
}

// 获取用户信息
export function getUser() {
  return authority.getUser()
}

// 保存用户信息
export function setAuthority(userInfo) {
  authority.saveUser(userInfo)
}

// 获取授权路由标识
export function getAuthority() {
  const user = getUser() || {}
  return user.authority
}
